import request from '@/utils/request'

export function getDepts(params) {
  return request({
    url: 'dept/tree',
    method: 'post',
    params
  })
}

export function save(data) {
  return request({
    url: 'dept/save',
    method: 'post',
    data
  })
}

export function del(id) {
  return request({
    url: 'dept/remove/' + id,
    method: 'post'
  })
}

export function update(data) {
  return request({
    url: 'dept/update',
    method: 'post',
    data
  })
}
